/**
 * SPDX-FileCopyrightText: 2023-2025 Sangfor Technologies Inc.
 * SPDX-License-Identifier: Mulan PSL v2
 */
let state = {
    step: 0,
    form: {
        jobName: '',
        engineType: "spark",
        jobType: "etl",
        codeType: "sql",
        sqlText: '',
        outputDataspace: '',
        outputDataset: '',
        writeMode: 'append',
        scheduleMode: 'once',
        scheduleTime: '0'
    },
};
let mutations = {
    changeStep(state, step) {
        state.step = step;
    },
    changeForm(state, form) {
        state.form = {
            ...state.form,
            ...form
        }
    },
    clearForm(state) {
        state.form = {
            jobName: '',
            engineType: "spark",
            jobType: "etl",
            codeType: "sql",
            sqlText: '',
            outputDataspace: '',
            outputDataset: '',
            writeMode: 'append',
            scheduleMode: 'once',
            scheduleTime: '0'
        }
    }
};


export default {
    state,
    mutations,
};
